<?php
	class OrderBO 
	{   
		private $order;

		function __construct($id = null)
		{
			if(isset($id))
				$this->order=R::load('isorder',$id);
			else
				$this->order=R::dispense('isorder');			
		}

		public function __get($field) {
                      return $this->order->$field;
                }
                
                public function getNumber() 
                {
                      return $this->order->id;
                }
		
                public function getCustomerBO() 
                {
                    return BOFactory::getCustomerBO($this->order->customer->id);
                }
		
                public function getPLIs()
                {
                    return $this->order->ownOrderpli;
                }
	}